<div id="divSWFUploadUI" style="margin-top: 20px;">
	<div class="fieldset  flash" id="fsUploadProgress">
	<span class="legend">上传队列</span>
	</div>
	<p id="divStatus">正在上传：0</p>
	<p>
		<span id="spanButtonPlaceholder"></span>
		<input id="btnCancel" type="button" value="删除所有上传" disabled="disabled" style="margin-left:2px; height:26px; font-size:12pt;" />
	</p>
</div>

<div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
	上传组件正在加载，请稍等...
</div>
<div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
	上传组件太久没有响应或者上传失败。请检查是否安装Flash组件并且可用！
</div>
<div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
	非常抱歉，上传组件无法加载，您可能需要重新安装Flash播放器，<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">请点击这里安装。</a>
</div>
<script src="/template/js/swfupload/swfupload.js"></script>
<script src="/template/js/swfupload/swfupload.queue.js"></script>
<script src="/template/js/swfupload/fileprogress.js"></script>
<script src="/template/js/swfupload/handlers.js"></script>
<script>
var swfu;
SWFUpload.onload = function () {
	var settings = {
		flash_url : "/template/js/swfupload/swfupload.swf",
		flash9_url : "/template/js/swfupload/swfupload_fp9.swf",
		upload_url: "/index.php?act=upload",
		file_post_name : 'imgFile',
		post_params: {},
		file_size_limit : "100 MB",
		file_types : "*.jpg;*.png;*.gif;*.jpeg",
		file_types_description : "所有图片",
		file_upload_limit : 100,
		file_queue_limit : 0,
		custom_settings : {
			progressTarget : "fsUploadProgress",
			cancelButtonId : "btnCancel"
		},
		debug: false,

		// Button Settings
		button_image_url : "!{res file='js/swfupload/XPButtonUploadText_61x22.png'}",
		button_placeholder_id : "spanButtonPlaceholder",
		button_width: 61,
		button_height: 22,

		// The event handler functions are defined in handlers.js
		swfupload_preload_handler : swfUploadPreLoad,
		swfupload_load_failed_handler : swfUploadLoadFailed,
		swfupload_loaded_handler : swfUploadLoaded,
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		queue_complete_handler : queueComplete	// Queue plugin event
	};

	swfu = new SWFUpload(settings);
}
</script>